﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FisheryPlatform.Search.Entity
{
    /// <summary>
    /// 产品索引信息
    /// </summary>
    public class ProductIndexEntity
    {
        #region
        private long _productId;
        /// <summary>
        /// 
        /// </summary> 
        public long ProductId
        {
            get { return _productId; }
            set { _productId = value; }
        }

        private string _title;
        /// <summary>
        /// 
        /// </summary> 
        public string Title
        {
            get { return _title; }
            set { _title = value; }
        }

        private long _categoryId;
        /// <summary>
        /// 
        /// </summary> 
        public long CategoryId
        {
            get { return _categoryId; }
            set { _categoryId = value; }
        }

        private long _areaId;
        /// <summary>
        /// 
        /// </summary> 
        public long AreaId
        {
            get { return _areaId; }
            set { _areaId = value; }
        }

        private string _description;
        /// <summary>
        /// 
        /// </summary> 
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }

        private long _type;
        /// <summary>
        /// 1:出售；2:求购
        /// </summary> 
        public long Type
        {
            get { return _type; }
            set { _type = value; }
        }

        private decimal _minPrice;
        /// <summary>
        /// 
        /// </summary> 
        public decimal MinPrice
        {
            get { return _minPrice; }
            set { _minPrice = value; }
        }

        private decimal _maxPrice;
        /// <summary>
        /// 
        /// </summary> 
        public decimal MaxPrice
        {
            get { return _maxPrice; }
            set { _maxPrice = value; }
        }

        private long _userId = 0;
        /// <summary>
        /// 
        /// </summary> 
        public long UserId
        {
            get { return _userId; }
            set { _userId = value; }
        }

        private System.DateTime _updateDate;
        /// <summary>
        /// 
        /// </summary> 
        public System.DateTime UpdateDate
        {
            get { return _updateDate; }
            set { _updateDate = value; }
        }

        private System.DateTime _createDate;
        /// <summary>
        /// 
        /// </summary> 
        public System.DateTime CreateDate
        {
            get { return _createDate; }
            set { _createDate = value; }
        }
        #endregion
    }

    /// <summary>
    /// 产品索引查询
    /// </summary>
    public class ProductQueryEntity : ProductIndexEntity
    {
        #region
        public ProductQueryEntity()
        {
            Paging = 1;
            PagingSize = 30;
        }

        private string _keyword;
        /// <summary>
        ///  Title 和 Description
        /// </summary> 
        public string Keyword
        {
            get { return _keyword; }
            set { _keyword = value; }
        }

        public int Repeat { get; set; }
        /// <summary>
        /// 
        /// </summary>
        public bool Raw { get; set; }
        /// <summary>
        /// 标准
        /// </summary>
        public string NormsField { get; set; }
        /// <summary>
        /// hitsPerPage
        /// </summary>
        public int Paging { get; set; }
        public int PagingSize { get; set; }
        #endregion
    }

    /// <summary>
    /// 产品索引查询结果
    /// </summary>
    public class ProductQueryResultEntity
    {
        #region
        public ProductQueryResultEntity()
        {
            List = new List<ProductIndexEntity>();
            RawList = new List<string>();
        }
        public int Index { get; set; }
        public int Count { get; set; }
        public int TotalHits { get; set; }
        public List<string> RawList { get; set; }
        public List<ProductIndexEntity> List { get; set; }
        #endregion
    }
}
